package com.csdj.service;

import com.csdj.entity.driverSchool;
import com.csdj.entity.driverSchoolExample;
import com.csdj.mapper.driverSchoolMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.transaction.Transactional;
import java.util.List;
@Transactional
@Service("driverSchoolService")
public class driverSchoolServiceimpl implements  driverSchoolService{

    @Resource
    private driverSchoolMapper schoolMapper;
    @Override
    public List<driverSchool> getallschool() {
        return schoolMapper.selectByExample(new driverSchoolExample());
    }

    @Override
    public driverSchool selDsId(Integer id) {
        driverSchoolExample driverSchoolExample = new driverSchoolExample();
        driverSchoolExample.createCriteria().andIdEqualTo(id);
        return schoolMapper.selectByExample(driverSchoolExample).get(0);
    }

    @Override
    public Integer updateDs(driverSchool driverSchool) {
        return schoolMapper.updateByPrimaryKey(driverSchool);
    }




}
